package com.quizh.euro.server.ws.exception;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;

import com.sun.jersey.api.Responses;

public class PermissionException extends WebApplicationException {
	 /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	  4      * Create a HTTP 404 (Not Found) exception.
	  5      */
	       public PermissionException() {
	           super(Response.status(Status.UNAUTHORIZED).build());
	       }
	   
	      /**
	       * Create a HTTP 404 (Not Found) exception.
	       * @param message the String that is the entity of the 404 response.
	       */
	      public PermissionException(String message) {
	          super(Response.status(Status.UNAUTHORIZED).
	                  entity(message).type("text/plain").build());
	          
	      }
}
